package com.yxhl.zoume.core.specialcar.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.yxhl.zoume.R;
import com.yxhl.zoume.common.ui.activity.base.BaseActivityWithToolBar;
import com.yxhl.zoume.core.car.fragment.common.CancelCarOrderFeedbackFragment;

/**
 * Created by vhawk on 2016/10/17.
 */

public class SpecialCarOrderCancelActivity extends BaseActivityWithToolBar {

    private static final String KEY_ORDER_ID = "ORDER_ID";
    private String orderId;

    public static Intent getCallingIntent(Activity activity, String orderId) {
        Intent intent = new Intent(activity, SpecialCarOrderCancelActivity.class);
        intent.putExtra(KEY_ORDER_ID, orderId);

        return intent;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        handelExtraParam();
        addFragment(R.id.special_car_order_cancel_activity_content, CancelCarOrderFeedbackFragment.newInstance(orderId));
        setToolbarTitle("取消原因");
    }

    private void handelExtraParam() {
        orderId = getIntent().getStringExtra(KEY_ORDER_ID);
    }

    @Override
    protected void onHeaderLeftClick(View view) {
        onBackPressed();
    }

    @Override
    protected void onHeaderRightClick(View view) {

    }

    @Override
    protected int getLayoutResId() {
        return R.layout.activity_special_car_order_cancel;
    }

    @Override
    protected void initializeInjector() {

    }
}
